package org.smallreunion.util;

import java.util.Random;

/**
 * RandomUtil
 *
 * @author Sinmetal
 *
 */
public class RandomUtil {

    private static Random random = new Random();

    /**
     * @param bytes
     * @see java.util.Random#nextBytes(byte[])
     */
    public static void nextBytes(byte[] bytes) {
        random.nextBytes(bytes);
    }

    /**
     * @return
     * @see java.util.Random#nextInt()
     */
    public static int nextInt() {
        return random.nextInt();
    }

    /**
     * @param n
     * @return
     * @see java.util.Random#nextInt(int)
     */
    public static int nextInt(int n) {
        return random.nextInt(n);
    }

    /**
     * @return
     * @see java.util.Random#nextLong()
     */
    public static long nextLong() {
        return random.nextLong();
    }

    /**
     * @return
     * @see java.util.Random#nextBoolean()
     */
    public static boolean nextBoolean() {
        return random.nextBoolean();
    }

    /**
     * @return
     * @see java.util.Random#nextFloat()
     */
    public static float nextFloat() {
        return random.nextFloat();
    }

    /**
     * @return
     * @see java.util.Random#nextDouble()
     */
    public static double nextDouble() {
        return random.nextDouble();
    }
}
